﻿using EFCore.Models;
using SIService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SService
{
    public class OutbounddetailsS : OutbounddetailsSI
    {
        private readonly WmssystemContext myDb;

        public OutbounddetailsS(WmssystemContext myDb)
        {
            this.myDb = myDb;
        }

        public async Task<int> Add(PO_Outbounddetails pO_Outbounddetails)
        {
            pO_Outbounddetails.O_DProductionDate = DateTime.Now;
            myDb.PO_Outbounddetails.Add(pO_Outbounddetails); // 确保不显式指定标识列的值
            return await myDb.SaveChangesAsync();
        }
    }
}
